public class Triangle extends Graphic{
    public double getPeri()
    {
        return _s1 + _s2 + _s3;
    }
    public double getAera()
    {
        double p = getPeri() / 2;
        return Math.sqrt((p * (p - _s1) * (p - _s2) * (p - _s3)));
    }

    public Triangle(double _s1, double _s2, double _s3) {
        this._s1 = _s1;
        this._s2 = _s2;
        this._s3 = _s3;
    }

    public double get_s1() {return _s1;}

    public double get_s2() {return _s2;}

    public double get_s3() {return _s3;}
    public String getMessage() {
        return "三角形，三边是：" + _s1 + "," +  _s2 + "," +  _s3 + " " +  " 面积是：" + getAera() + " 周长是：" + getPeri();
    }
    private double _s1;
    private double _s2;
    private double _s3;
}
